package com.ycw.service.wang.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ycw.bean.QuestionAll;
import com.ycw.dao.QuestionAllMapper;
import com.ycw.service.wang.QuestionAllService;


@Service
public class QuestionAllServiceImpl implements QuestionAllService {
	@Autowired
	QuestionAllMapper questionAllMapper;

	@Override
	public List<QuestionAll> getAllQuestionAll() {
		List<QuestionAll> question = questionAllMapper.selectAll();
		return question;
	}

	@Override
	public boolean addQusetionAll(QuestionAll question) {
		int i = questionAllMapper.insertSelective(question);
		if (i > 0) {
			return true;
		}
		return false;
	}

	@Override
	public boolean updateQuestion(QuestionAll question) {
		int i = questionAllMapper.updateByPrimaryKeySelective(question);
		if (i > 0) {
			return true;
		}
		return false;
	}

	@Override
	public boolean deleteQuestion(QuestionAll question) {
		int i = questionAllMapper.deleteByPrimaryKey(question);
		if (i > 0) {
			return true;
		}
		return false;
	}

}
